<?php

namespace App\Http\Resources\shop;

use Illuminate\Http\Resources\Json\Resource;

class ShopResource extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {

        return [
            'id'          => $this->resource->id,
            'img'         => $this->resource->img,
            'name'        => $this->resource->name,
            'address'     => $this->resource->address,
            'log'         => $this->resource->log,
            'lat'         => $this->resource->lat,
            'selling_num' => $this->resource->selling_num,
            'start_hour'  => $this->resource->start_hour,
            'end_hour'    => $this->resource->end_hour,
            'phone'       => $this->resource->phone,
            'items'       => $this->resource->items
        ];
    }
}
